package hp.com.service;

import hp.com.entity.Users;

import java.sql.SQLException;

import hp.com.entity.Users;

public interface UsersService {
    //用户注册
    boolean addUsers(Users users) throws Exception;

    boolean UsersById(Users users) throws Exception;

    //电话查询用户信息
    Users checkPhone(Users users) throws Exception;

    // 验证用户修改时手机号是否输入正确
    boolean checkOldPhone(Users users) throws Exception;

    // 验证手机号是否被其它用户注册
    boolean checkNewPhone(Users users) throws Exception;

    // 用户修改手机号
    boolean updateUserPhone(Users users)throws Exception;

    // 验证用户修改时邮箱是否输入正确
    boolean checkOldEmail(Users users) throws Exception;

    // 用户修改邮箱
    boolean updateUserEmail(Users users)throws Exception;

    // 验证用户修改时原密码是否输入正确
    boolean checkOldPwd(Users users) throws Exception;

    //通过ID获取用户对象完整信息
    Users GetUserById(int ID) throws Exception;

    // 通过id进行密码修改
    boolean updateUsersPwd(Users users)throws Exception;
    //检查手机号可用性
    boolean checkPhoneValid(String phone) throws Exception;
}
